home *** CD-ROM | disk | FTP | other *** search
- /************************************************************************
- CATEGORY: MiscFile (Searching)
- PROGRAMMER: Todd Thomas, Copyright 1994, 1995.
- BEGAN: December 22, 1994
- LAST CHANGED: January 25, 1995
- CHANGES: -
- VERSION: 0.2
- DECLARED IN: <misckit/MiscFile.h>
-
- Adds the capability of searching an instance of MiscFile for specific
- filenames. Probably not all that efficient, but it does work. It is
- also very flexible since it consults the class delegate to see if each
- file should be added to the returned list.
-
- This object is included in the MiscKit by permission from the author
- and its use is governed by the MiscKit license, found in the file
- "LICENSE.rtf" in the MiscKit distribution. Please refer to that file
- for a list of all applicable permissions and restrictions.
-
- *************************************************************************/
-
-
- @interface MiscFile (Searching)
-
- // Used for searching through MiscFiles and their children to match the
- // given filename. If a match is found, a MiscFile representing the
- // filename is returned, else nil.
-
- - (MiscFile *)searchFor: (const char *)filename;
- - (MiscFile *)searchFor: (const char *)filename recursive: (BOOL)recursive;
- - (MiscFile *)searchFor: (const char *)filename recursive: (BOOL)recursive
- followLinks: (BOOL)followLinks;
-
- // Methods for searching a MiscFile and it's children while consulting the
- // class delegate on whether the MiscFile should be added to the List that
- // will be returned.
-
- - (List *)searchFiles;
- - (List *)searchFilesAndRecurse: (BOOL)recursive;
- - (List *)searchFilesAndRecurse: (BOOL)recursive
- followLinks: (BOOL)followLinks;
-
- @end
-
-
- @interface Object (MiscFileSearchingDelegate)
-
- // The class delegate (if there is one) can implement this method
- // to decide which files should be chosen when using the searchFiles*
- // methods
- - (BOOL)addFile: (MiscFile *) theFile;
-
- @end
-
-